import Vue from 'vue'
import Router from 'vue-router'
import zst from './zst'
import detail from './detail'
import wf from './wf'

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: '/',
      name: 'index',
      component: () =>import('@/page/index'),
    },
    {
      path: '/record/:id',
      name: 'record',
      component: () =>import('@/page/record'),
    },
    {
      path: '/error',
      name: 'error',
      component: () =>import('@/page/error'),
    },
    ...zst,
    ...detail,
    ...wf,
  ],
  //进入页面就到定点到顶点
  scrollBehavior(to, from, savedPosition) {
    return {
      x: 0,
      y: 0
    }
  }
})
